package com.example.cloud.model.member;

import com.example.cloud.model.common.CommonModel;
import lombok.Data;
import lombok.EqualsAndHashCode;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;

/**
 * Created by wangtao on 2018/7/30.
 * 会员产品类折扣
 */
@Entity(name = "member_discount_product_category")
@Data
@EqualsAndHashCode(callSuper = false)
public class MemberDiscountProductCategory extends CommonModel {
    @Id
    @GeneratedValue(strategy = GenerationType.AUTO)
    private Long id;
    // 患者主键
    @Column(name = "patient_id")
    private Long patientId;
    // 会员主键
    @Column(name = "member_id")
    private Long memberId;
    // 病房主键
    @Column(name = "home_id")
    private Long homeId;
    // 折扣名称
    @Column(name = "discount_name")
    private String discountName;
    // 折扣说明
    @Column(name = "discount_desc")
    private String discountDesc;
    // 类别{1：大类 2：小类}
    @Column(name = "category_type")
    private int categoryType;
    // 品类
    @Column(name = "category_id")
    private Long categoryId;
    @Column(name = "category_name")
    private String categoryName;
    // 折扣率
    @Column(name = "discount",columnDefinition = "DOUBLE(10,2) DEFAULT '0.00'")
    private Double discount;
    // 过期标识{0：未过期 1：过期}
    @Column(name = "expired", columnDefinition = "INT DEFAULT 0")
    private int expired;
}
